<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common_css :: commonHeader('凭证模板管理')"></head>
<body>
<!--搜索框-->
<form method="post" id="tabfrom">
    <div style="padding:2px" class="easyui-panel" title="数据查询">
        <table class="form-table">
            <tr>
                <td align="right" width="10%">核算方案：</td>
                <td align="left">
                    <input id="projectId" class="easyui-combobox" editable="false"
                           data-options="valueField:'id',textField:'name',prompt:'==请选择==',panelHeight:'auto'"/>
                </td>
                <td align="right" width="10%">凭证摘要：</td>
                <td align="left"><input id="selRemark" style="width:150px" class="easyui-validatebox"></td>
                <td align="right" width="10%">凭证来源：</td>
                <td align="left">
                    <input id="selSource" class="easyui-combobox"
                           data-options="valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"/>
                </td>
                <td align="right" width="10%">凭证类型：</td>
                <td align="left">
                    <input id="selFtype" class="easyui-combobox"
                           data-options="valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"/>
                    <a class="easyui-linkbutton" iconCls='icon-search' onclick="doSearch();">查询</a>
                </td>
            </tr>
        </table>
    </div>
    <br>
</form>
<div id="toolbar">
    <shiro:hasPermission name="finance:voucher:template:add">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add"
           onclick="addVoucherTemplate()">添加</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="finance:voucher:template:edit">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit"
           onclick="editVoucherTemplate()">修改</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="finance:voucher:template:del">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel"
           onclick="delVoucherTemplate()">删除</a>
    </shiro:hasPermission>
</div>

<div id="dg"></div>

<div id="dlg" class="easyui-dialog" style="width:900px;height:550px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <form id="myform" method="post">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <tr>
                    <td>科目编码：</td>
                    <td>
                        <input id="subjectId" name="subjectId" class="easyui-combotree" style="width:400px"
                               data-options="required:true,prompt:'==请选择==',panelHeight:'150px',panelWidth:'400px'"
                               missingMessage="请维护科目代码" validType="comtreeValidate['subjectId','请维护科目代码']"/>
                        <input type="hidden" id="id" class="textbox" name="id">
                    </td>
                </tr>
                <tr>
                    <td>凭证摘要：</td>
                    <td>
                        <input class="easyui-validatebox" style="width:400px"
                               data-options="required:true" missingMessage="请输入凭证摘要"
                               name="remark"/>
                    </td>
                </tr>
                <tr>
                    <td>金额表达式：</td>
                    <td>
                        <input class="easyui-validatebox" style="width:400px"
                               data-options="required:true" missingMessage="请输入金额表达式"
                               name="moneyExpression"/>
                    </td>
                </tr>
                <tr>
                    <td>数量表达式：</td>
                    <td>
                        <input class="easyui-validatebox" style="width:400px" name="amountExpression"/>
                    </td>
                </tr>
                <tr>
                    <td>公用条件表达式：</td>
                    <td>
                        <input class="easyui-validatebox" style="width:400px" name="conditionCommon"/>
                    </td>
                </tr>
                <tr>
                    <td>参数条件表达式：</td>
                    <td>
                        <input class="easyui-validatebox" style="width:400px" name="conditionParam"/>
                    </td>
                </tr>
                <tr>
                    <td>凭证来源：</td>
                    <td>
                        <input id="source" name="source" class="easyui-combobox" style="width:400px"
                               data-options="required:true,valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"
                               missingMessage="请维护凭证来源" validType="comboxValidate['source','请维护凭证来源']"/>
                    </td>
                </tr>
                <tr>
                    <td>凭证类型：</td>
                    <td>
                        <input id="ftype" name="ftype" class="easyui-combobox" style="width:400px"
                               data-options="required:true,valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"
                               missingMessage="请维护凭证类型" validType="comboxValidate['ftype','请维护凭证类型']"/>
                    </td>
                </tr>
                <tr>
                    <td>借贷方向：</td>
                    <td>
                        <input id="drandcr" name="drandcr" editable="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: 'DR',  value: '借方' },{ label: 'CR', value: '贷方'}]"/>
                    </td>
                </tr>
                <tr>
                    <td>凭证顺序：</td>
                    <td>
                        <input class="easyui-validatebox"
                               data-options="required:true"
                               name="sequence" missingMessage="请输入字段位数,必须大于0正整数！" validType="integerZero"/>
                    </td>
                </tr>
                <tr>
                    <td>分录是否循环：</td>
                    <td>
                        <input id="isLoop" name="isLoop" editable="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '1',  value: '是' },{ label: '2', value: '否'}]"/>
                    </td>
                </tr>
            </table>
            <br>
            <div id="divAuxilary">
                <div style="height: 20px; background: #e0ecff">科目辅助项信息：</div>
                <br>
                <table id="auxilary" cellpadding="2px" cellspacing="0" class="form-table" data-options="title:'导航菜单'">
                </table>
            </div>
        </div>
    </form>
</div>


<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/finance/voucherTemplate.js}"></script>
</body>
</html>
